(function(angular){
	//创建模块
	var app = angular.module("ggtApp",[]);
	//创建控制器
	app.controller("ggtCtrl",["$scope","$http",function($scope,$http){
		$http({
			method:"GET",
			url:'http://139.199.192.48:9090/api/getcategorytitle'
		})
		.then(function(data){
			$scope.data = data.data.result;
		});
		$scope.datalist={
			
		}
		$scope.showId = function(id){
			$http({
				method:"GET",
				url:'http://139.199.192.48:9090/api/getcategory?titleid='+id
			})
			.then(function(dataList){
				$scope.datalist[id] = dataList.data.result;
			});
		}
	}])
})(angular)
